package DynamicProgramming;

import java.io.PrintWriter;
import java.util.Scanner;

class Solver1225
{	int n;
	long[] DynRs;

	public void Input()
	{	Scanner in=new Scanner(System.in);
		n=in.nextInt();
		
		DynRs=new long[n+1];
		DynRs[0]=0;DynRs[1]=2;
	}
	public void Solve()
	{	for (int i=2;i<=n;i++)
			DynRs[i]=DynRs[i-1]+DynRs[i-2];
	}
	public void Output()
	{	PrintWriter out=new PrintWriter(System.out);
		out.println(DynRs[n]);
		out.flush();
	}
	public void main()
	{	Input();
		Solve();
		Output();
	}
}
public class P1225
{	public static void main(String[] args)
	{	Solver1225 solver=new Solver1225();
		solver.main();
	}
}
